﻿using System.ComponentModel;
using nRoute.Components;
using System.Runtime.Serialization;

namespace nRoute.Samples.OfficerXcel.Model
{
    [DataContract]
    public class AdvancedSettings
        : INotifyPropertyChanged
    {
        private bool _replaceText = true;
        private bool _selectWord = true;
        private bool _textDandD = true;
        private bool _cntrlClick = true;
        private bool _autoshapes;
        private bool _smartPara;
        private bool _smartCursor;
        private bool _overtype;
        private int _fieldShading;
        private int _pasting;

#region Properties

        [DataMember]
        public bool ReplaceText
        {
            get
            {
                return _replaceText;
            }
            set
            {
                if (_replaceText != value)
                {
                    _replaceText = value;
                    PropertyChanged.Notify(() => ReplaceText);
                }
            }
        }

        [DataMember]
        public bool SelectWord
        {
            get
            {
                return _selectWord;
            }
            set
            {
                if (_selectWord != value)
                {
                    _selectWord = value;
                    PropertyChanged.Notify(() => SelectWord);
                }
            }
        }

        [DataMember]
        public bool TextDandD
        {
            get
            {
                return _textDandD;
            }
            set
            {
                if (_textDandD != value)
                {
                    _textDandD = value;
                    PropertyChanged.Notify(() => TextDandD);
                }
            }
        }

        [DataMember]
        public bool CtrlClick
        {
            get
            {
                return _cntrlClick;
            }
            set
            {
                if (_cntrlClick != value)
                {
                    _cntrlClick = value;
                    PropertyChanged.Notify(() => CtrlClick);
                }
            }
        }

        [DataMember]
        public bool Autoshapes
        {
            get
            {
                return _autoshapes;
            }
            set
            {
                if (_autoshapes != value)
                {
                    _autoshapes = value;
                    PropertyChanged.Notify(() => Autoshapes);
                }
            }
        }

        [DataMember]
        public bool SmartPara
        {
            get
            {
                return _smartPara;
            }
            set
            {
                if (_smartPara != value)
                {
                    _smartPara = value;
                    PropertyChanged.Notify(() => SmartPara);
                }
            }
        }

        [DataMember]
        public bool SmartCursor
        {
            get
            {
                return _smartCursor;
            }
            set
            {
                if (_smartCursor != value)
                {
                    _smartCursor = value;
                    PropertyChanged.Notify(() => SmartCursor);
                }
            }
        }

        [DataMember]
        public bool Overtype
        {
            get
            {
                return _overtype;
            }
            set
            {
                if (_overtype != value)
                {
                    _overtype = value;
                    PropertyChanged.Notify(() => _overtype);
                }
            }
        }

        [DataMember]
        public int FieldShading
        {
            get
            {
                return _fieldShading;
            }
            set
            {
                if (_fieldShading != value)
                {
                    _fieldShading = value;
                    PropertyChanged.Notify(() => FieldShading);
                }
            }
        }

        [DataMember]
        public int Pasting
        {
            get
            {
                return _pasting;
            }
            set
            {
                if (_pasting != value)
                {
                    _pasting = value;
                    PropertyChanged.Notify(() => Pasting);
                }
            }
        }

#endregion

#region INotifyPropertyChanged Members

        public event PropertyChangedEventHandler PropertyChanged;

#endregion

    }
}
